package com.zwjlg.module_user;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.zwjlg.baselibrary.ARouterConstants;
import com.zwjlg.module_other.service.OtherService;

/**
 * ================================================
 * <p>
 * Created by ligang on 2021/3/29 17:08
 * ================================================
 */
@Route(path = ARouterConstants.Activitys.USER_MAIN)
public class UserMainActivity extends AppCompatActivity {
    @Autowired
    OtherService otherService;
    TextView tvMessage;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ARouter.getInstance().inject(this);
        setContentView(R.layout.user_activity);
        tvMessage = findViewById(R.id.tv_message_user);
        findViewById(R.id.btn_call_other).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                tvMessage.setText(tvMessage.getText() + "\n" + otherService.getKey());
            }
        });
    }
}
